/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hcsc.datapower.CMDB.common;

import com.hcsc.datapower.CMDB.integration.User;
/**
 *
 * @author I307211
 */
public class AuthUser {
    
    private static User currentUser;

    public static User getCurrentUser() {
        if(currentUser==null){
            return null;
        }
        return currentUser;
    }

    public static void setCurrentUser(User currentUser) {
        AuthUser.currentUser = currentUser;
    }
    
    public static boolean hasAdminAccess(){
        return getCurrentUser().getAuthLevel().equalsIgnoreCase("admin");
    }
  
}
